package vista;
import java.awt.BorderLayout;
import java.awt.LayoutManager;

import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaCalendario extends javax.swing.JFrame {
	private JPanel panCalendario;
	private JLabel lblCalendario;
	private JTable tblCalendario;
	private JScrollPane scrCalendario;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VentanaCalendario inst = new VentanaCalendario();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VentanaCalendario() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panCalendario = new JPanel();
				getContentPane().add(panCalendario, BorderLayout.CENTER);
				panCalendario.setPreferredSize(new java.awt.Dimension(488, 357));
				panCalendario.setLayout(null);
				{
					scrCalendario = new JScrollPane();
					panCalendario.add(scrCalendario);
					scrCalendario.setBounds(34, 32, 423, 298);
					{
					
						tblCalendario = new JTable();
						scrCalendario.setViewportView(tblCalendario);
				
					}
				}
				{
					lblCalendario = new JLabel();
					panCalendario.add(lblCalendario);
					lblCalendario.setText("Calendario de Partidos");
					lblCalendario.setBounds(158, 7, 187, 19);
					lblCalendario.setFont(new java.awt.Font("DejaVu Sans Condensed",1,16));
				}
			}
			pack();
			this.setSize(491, 387);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void setPartidos(AbstractTableModel abstractTableModel){
		tblCalendario.setModel(abstractTableModel);
	}
	
	public void mostrarMensaje(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}
}
